The invention is employed in a data processing system, having one or more terminals or consoles which provide display means and keyboard signal input means, and providing in storage physical records modeled as at least one relational database.
Among the individual ultimate users of the data processing system and database records are some users, such as clerks and managers, who are not programmers. Such users wish to be able to use the system terminals to view displayed representations of the records stored in the data processing system memory, to select specific records or parts of records to view, to delete or modify physical records in the memory, or to add new physical records to the memory. For these purposes the physical records must be selected, accessed in the physical storage, and retrieved (copied), and representations of the retrieved records must be displayed to the user at one of the terminals in some predetermined display format.
To permit this use of the stored database records, there must be provided in the data processing system stored coded instructions which when executed by the data processing system cause representations of the physical records, as well as representations of signals input by the user through the keyboard, to be displayed in a particular format on the display. Further, there must be provided stored coded instructions which when executed by the data processing system cause the interpretation of the signals input by the user through the keyboard, and which cause the retrieval and modification of the physical records of the stored database in response to such input signals.
Such instructions, designed for a particular use of the records of a particular database, together comprise one of a class of programs known as "database applications programs", that is, programs used by the ultimate user of the data processing system to carry out the application desired by him on the stored physical records of a particular database.
The preparation of such applications programs has typically required weeks or months of effort by an applications programmer, followed by additional weeks to detect and eliminate errors in the program so that it becomes reliable and relatively error-free in use.
It is therefore desirable to provide means for simplifying the construction and operation of such database applications programs, and it is an object of my invention to provide such means.
As is well understood in the art, the user (or programmer) of a data processing system does not deal directly with the physical records stored in the system's memory. Rather, he deals with a model of such records, provided when needed by means of programming stored in the system's memory and executed by the processor as needed.
Referring to FIG. 2, the physical records are stored on physical media, advantageously as magnetic signals stored on magnetic disks 24 comprising secondary memory 16. The magnetic signals are physically organized on disks 24 in a manner well understood in the art of managing such memory media. The particular organization of such signals, and the particular means of locating them and copying them into main memory 14, are highly dependent on the hardware aspects of the particular memory media employed.
Several models of the records are provided, having different degrees of abstraction from the underlying stored physical records. Briefly, these are (referring to FIG. 2): the "external" view (26 or 28), in which "external" or "logical" records are seen by a particular user; the "conceptual view" (30), in which "conceptual" records are seen, each external view being a subset of the conceptual view; and the "internal" view (32) in which "internal" or "stored" records are seen.
It will be recognized that, when the data processing system operates to construct and present for use the records of each view shown in FIG. 2, these records are at that time (during such use) represented within the data processing system by physical signals derived from the magnetic signals stored on disks 24. When such use is concluded, the constructed records are no longer physically represented within system 10. In contrast, the underlying physical records stored on disks 24 remain on the disks at all times, whether or not they are in use, until deleted or modified.
The signals representing the records as seen in the various views 26, 28, 30, and 32 are derived from the physical records stored on media 24 by the data processing system, by means of the operation of a database management system, in other words by the execution of a suitable stored program by processor 12. As seen in the conceptual showing of FIG. 3, the physical records on media 24 are physically written, copied, and deleted by the data processing system under the control of a program element known as an access method, in a manner well understood in the art, and forming no part of the present invention. The access method is regarded as presenting to the database management system "stored" or "internal" records corresponding to and derived from the physical records.
The "internal" view is not seen by the user of the database (although it may be known to a programmer using the system). Processor 12, operating according to other portions of the database management system program, constructs from the stored or internal records the records of the conceptual view and its subsets, the external views. The definitions of the conceptual records are independent of the storage structure or the strategy employed by the access method for efficiently locating and retrieving the physical records.
Records in a database may be related to other records in the database, and the relationship is of interest to the user of the database. The relationship is itself represented as an entity in the database.
It is well understood in the database management art that the conceptual records of a database, and the relationships among them, may be organized or modeled in one of three possible ways, known as relational, hierarchical, and network models.
The present invention relates to the management of the records of a database modeled as a relational database.
The records of a relational database are conceptually organized as tables (also referred to as "relations". Referring to FIG. 4, a table (relation) of a relational database comprises a plurality of rows; each row is a record (or tuple) comprising a plurality of fields. All rows of a particular table have the same number of fields. The fields of the records are arranged in columns; a column is also referred to as an attribute. The elements of a column are all members of a class of such elements, referred to as a domain, and the column is named by a column heading (domain name). Each record includes one or more fields whose content is an index or key, to be used in uniquely identifying the record.
A crucial feature of relational data structure is that associations between rows (tuples) are represented solely by data values in columns drawn from a common domain, rather than in terms of the physical location on disk of the related records.
Relational databases have various advantages over the two alternative models. Generally speaking, while hierarchical and network databases are organized to make it efficient to deal with one record at a time and to obtain a single related record at a time, relational databases are organized to make it efficient to deal with a set of records at a time and to obtain a set of related records at a time.
It is an important aspect of the relational model that the tables (relations), if they conform with certain constraints, may be considered as mathematical elements, also called relations, as to which a rigorous mathematical treatment already exists. Hence, operations on the tables can be analyzed in terms of this mathematical theory, an advantage in clearly understanding the effects of such operations. In particular, representing the data in the form of uniformly defined sets makes possible a corresponding uniformity in the set of operators which transform the sets, which simplifies the task of providing program elements for controlling a data processing system to transform such sets. It is an object of my invention to extend this advantage to aspects of database maintenance where it has not previously been provided, by providing an enumerated relation.
A crucial feature of relational data structure is that associations between rows (tuples) are represented solely by data values in columns drawn from a common domain, rather than in terms of the physical location on disk of the related records.
Relational databases have various advantages over the two alternative models. Generally speaking, while hierarchical and network databases are organized to make it efficient to deal with one record at a time and to obtain a single related record at a time, relational databases are organized to make it efficient to deal with a set of records at a time and to obtain a set of related records at a time.
It is an important aspect of the relational model that the tables (relations), if they conform with certain constraints, may be considered as mathematical elements, also called relations, as to which a rigorous mathematical treatment already exists. Hence, operations on the tables can be analyzed in terms of this mathematical theory, an advantage in clearly understanding the effects of such operations. In particular, representing the data in the form of uniformly defined sets makes possible a corresponding uniformity in the set of operators which transform the sets, which simplifies the task of providing program elements for controlling a data processing system to transform such sets. It is an object of my invention to extend this advantage to aspects of database maintenance where it has not previously been provided, by providing an enumerated relation.
There may be (and typically are) many databases stored in the data processing system, containing physical records representing information of various kinds. For example, there may be a personnel database containing information on employees, such as their names, departments, salaries, skills, employment history, and the like, with related information about the departments in which the employees work. There may be a sales database containing information about the company's customers and their orders to the company, with dates, prices, and payment history; there may be a procurement database containing information about the company's suppliers and the items supplied by them, with quantities and information about their use in products.
For each such database, there may be several distinct users; each user may be concerned with only a portion of the information in the particular database.
Generally speaking, several distinct application programs must be provided to enable such users to access and use each database. Each additional database generally requires a further plurality of distinct application programs. Creation of an application program typically requires weeks or months of effort by a professional applications programmer, followed by additional weeks to detect and eliminate errors in the program so that it becomes reliable and relatively error-free in use.
It will be evident that the provision of the applications programs is a significant element in the cost of maintaining a database. It would therefore be desirable to provide means for creating such programs in a simple, rapid and inexpensive manner.
Furthermore, when such programs are created by professional programmers who will not themselves be the ultimate users of the program and the database, frequently the programmers have an imperfect understanding of the purposes of the ultimate users, and the resultant application program is not as well suited to the users' needs as could be wished. It would be desirable to permit the users themselves to create the application program, which could then be closely fitted to their purposes. Since most such users are not programmers, this has not hitherto been easy to accomplish.
A particularly burdensome and time-consuming aspect of the creation of such application programs has been the provision of means permitting the user of the database to make a transition from viewing members of a particular set of record occurrences to viewing members of a related set of record occurrences. (The nature of the relationship is explained in more detail herein.) This transition is one which is frequently desired in an application program. It would be desirable to provide simple and economical means permitting such transitions.
It is therefore an object of my invention to provide means for creating such application programs in a simple, rapid and inexpensive manner, interactively and nonprocedurally. It is a further object to provide means for permitting the database users themselves to create the application program. It is another object to provide in such an application program simple and economical means permitting the user of the database to make a transition from viewing members of a first set of records to viewing members of a related set of records.